
package com.daguchuangyi.erp_android.model.product;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class Operator implements Parcelable {

    @SerializedName("productAccess")
    @Expose
    private ProductAccess productAccess;
    @SerializedName("storageAccess")
    @Expose
    private StorageAccess storageAccess;
    @SerializedName("name")
    @Expose
    private String name;
    public final static Creator<Operator> CREATOR = new Creator<Operator>() {


        @SuppressWarnings({
                "unchecked"
        })
        public Operator createFromParcel(Parcel in) {
            return new Operator(in);
        }

        public Operator[] newArray(int size) {
            return (new Operator[size]);
        }

    };

    protected Operator(Parcel in) {
        this.productAccess = ((ProductAccess) in.readValue((ProductAccess.class.getClassLoader())));
        this.storageAccess = ((StorageAccess) in.readValue((StorageAccess.class.getClassLoader())));
        this.name = ((String) in.readValue((String.class.getClassLoader())));
    }

    public Operator() {
    }

    public ProductAccess getProductAccess() {
        return productAccess;
    }

    public void setProductAccess(ProductAccess productAccess) {
        this.productAccess = productAccess;
    }

    public StorageAccess getStorageAccess() {
        return storageAccess;
    }

    public void setStorageAccess(StorageAccess storageAccess) {
        this.storageAccess = storageAccess;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(productAccess);
        dest.writeValue(storageAccess);
        dest.writeValue(name);
    }

    public int describeContents() {
        return 0;
    }

}
